package com.jilujia.domain.hotel.repository;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.jilujia.domain.hotel.HotelViewCount;
import com.jilujia.framework.domain.JpaBusinessRepository;

@Repository
public interface HotelViewCountRepository extends JpaBusinessRepository<Long, HotelViewCount> {

	@Transactional(readOnly = true)
	@Query("select a from HotelViewCount a where a.hotelId = :hotelId")
	public HotelViewCount findHotelViewCountByHotelId(@Param("hotelId") Long hotelId);
}
